package com.huiquan.icd.dao;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.huiquan.icd.domain.IcdDiseaseIndex;
import com.huiquan.framework.base.EnhancedBaseDao;
import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class IcdDiseaseIndexDao extends EnhancedBaseDao<IcdDiseaseIndex> {

	@Resource(name = "sqlMapClient")
	private SqlMapClient sqlMapClient;

	public static final String space = "ICD_DISEASE_INDEX.";

	public IcdDiseaseIndexDao() {
		super(space);
	}

	public void deleteUnchecked() {
		this.delete(space + "DELETE_UNCHECKED", sqlMapClient);
	}

	public int initCount() {
		Integer size = (Integer) this.object(space + "INIT_COUNT", sqlMapClient);
		return size == null ? 0 : size;
	}

	public int init() {
		return this.update(space + "INIT", sqlMapClient);
	}
}
